<?php
include "phpqrcode.php";
$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
$burl = strstr( $url,'qr.php');
$qurl = strstr( strstr( $url, '?url='), 'http');
if ($burl !== "qr.php?" and strpos($burl,'?url=http://') !== false) {
$value=$qurl;
}
else {
$value = "https://www.moerats.com/";
}
$errorCorrectionLevel = "L";
$matrixPointSize = "8";
$margin="1";
QRcode::png($value, false, $errorCorrectionLevel, $matrixPointSize,$margin);
echo $burl;
exit;
?>